package com.billdowney.entity.area;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.billdowney.entity.base.BaseEntityIdByUUIDHex;

import io.swagger.annotations.ApiModelProperty;

/**
 * @Description: 统计用区划代码和城乡划分代码，地级，二级
 * @author: 唐路钧
 * @date: 2018年8月29日 下午6:11:04
 */
@Entity
@Table(name = "china_city")
public class ChinaCity extends BaseEntityIdByUUIDHex {

	private static final long serialVersionUID = 971192140867362896L;

	@ApiModelProperty(value = "名称")
	private String name;
	@ApiModelProperty(value = "代码", notes = "各个等级单独统计用区划代码")
	private String code;
	@ApiModelProperty(value = "完整代码", notes = "各个等级包括父级统计用区划代码")
	private String fullCode;
	@ApiModelProperty(value = "补全代码", notes = "各个等级包括父级统计用区划代码并补全12位")
	private String completionCode;

	@ManyToOne(targetEntity = ChinaProvince.class, fetch = FetchType.LAZY)
	@JoinColumn(name = "chinaProvince_id")
	@ApiModelProperty(value = "省级信息")
	private ChinaProvince chinaProvince;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getFullCode() {
		return fullCode;
	}

	public void setFullCode(String fullCode) {
		this.fullCode = fullCode;
	}

	public String getCompletionCode() {
		return completionCode;
	}

	public void setCompletionCode(String completionCode) {
		this.completionCode = completionCode;
	}

	public ChinaProvince getChinaProvince() {
		return chinaProvince;
	}

	public void setChinaProvince(ChinaProvince chinaProvince) {
		this.chinaProvince = chinaProvince;
	}

	@Override
	public String toString() {
		return "ChinaCity [name=" + name + ", code=" + code + ", fullCode=" + fullCode + ", completionCode="
				+ completionCode + "]";
	}
}
